package com.astar.service.impl;

import com.astar.entity.RoleMenu;
import com.astar.mapper.RoleMenuMapper;
import com.astar.service.IRoleMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色和菜单关联表 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2020-01-17
 */
@Service
public class RoleMenuServiceImpl extends ServiceImpl<RoleMenuMapper, RoleMenu> implements IRoleMenuService {


    @Autowired
    private RoleMenuMapper roleMenuMapper;
    @Override
    public List<RoleMenu> selectTreeCheck(Integer id) {
        return roleMenuMapper.selectTreeCheck(id);
    }

    @Override
    public int deleteForRoleId(RoleMenu roleMenu) {
        return roleMenuMapper.deleteForRoleId(roleMenu);
    }

    @Override
    public int insertSelective(RoleMenu roleMenu) {
        return roleMenuMapper.insertSelective(roleMenu);
    }
}
